<template>
  <Teleport to="#file-relation-db-modal-search">
    <search />
  </Teleport>
  <div style="height: 5px"></div>
  <a-table />
</template>
<script setup>
import ATable from './file-relation-db-modal-content-detail-table.vue'
import search from './file-relation-db-modal-content-detail-search.vue'
import {
  useProvideContextRegistry,
  useStaticPermission,
} from './provide-context.js'
import { toRef, onMounted, nextTick, ref } from 'vue'

/**
 * 外部参数
 */
let props = defineProps({
  groupId: { type: String },
  treeSelectedInfo: { type: Object },
})
// /**
//  * 事件定义
//  */
// let emit = defineEmits(['update:groupId'])
// /**
//  * 双向绑定
//  */
// let groupId = useVModel(props, 'groupId', emit)
let groupId = toRef(props, 'groupId')
let treeSelectedInfo = toRef(props, 'treeSelectedInfo')
let staticPermission = useStaticPermission()
useProvideContextRegistry({
  groupId,
  treeSelectedInfo,
  categoryId: groupId,
  staticPermission,
})
</script>
<style scoped lang="less">
.title-wrap {
  display: flex;
  white-space: nowrap;
  align-items: center;
  span {
    margin-right: 12px;
  }
}
</style>
